<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="images/favicon.png" type="image/png">

    <title>帝皇车后服务管理平台</title>

    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/css/animate.min.css" rel="stylesheet">
    <link href="/css/style.min.css" rel="stylesheet">
    <link href="/css/login.min.css" rel="stylesheet">

    <script src="/js/jquery.min.js?v=2.1.4"></script>
    <script type="text/javascript">
        //session 过期，解决新页面嵌套到iframe 问题
        if (window != top) {
            top.location.href = location.href;
        }
        function login(){
            var userName = $("#userName").val();
            var password = $("#password").val();
            if(!userName || !password)return;
            $.getJSON("${rc.contextPath}/ajaxLogin",{userName:userName,password:password},function(resp){
                if(resp.resultCode == 1){
                    window.location.href = "${rc.contextPath}/"
                }else{
                    alert(resp.message);
                }
            })
        }

        $(function(){
            $("#username").focus();
            $("#password").keyup(function(event){
                if(event.keyCode ==13){
                    login();
                }
            });
        })
    </script>
</head>

<body class="signin">
    <div class="signinpanel">
        <div class="row">
            <div class="col-sm-7">
                <div class="signin-info">


                </div>
            </div>
            <div class="col-sm-5">
                <form id="frmLogin">
                    <h4 class="no-margins">登录：</h4>
                    <p class="m-t-md">帝皇车后服务管理平台</p>
                    <input type="text" class="form-control uname" placeholder="用户名" id="userName"/>
                    <input type="password" class="form-control pword m-b" placeholder="密码" id="password"/>
                    <a href="">忘记密码了？</a>
                    <button type="button" class="btn btn-success btn-block" onclick="login()">登录</button>
                </form>
            </div>
        </div>
        <div class="signup-footer" style="position: absolute;bottom: 0px;margin-left: auto;text-align: center">
            <div class="pull-left">
                &copy; 2015 All Rights Reserved. EC-Empire Inc.
            </div>
        </div>
    </div>
</body>

</html>